package cn.javass.dp.command.example2;

public class Box {

    //开机按钮
    private Command openCommand = null;

    //因为主机上按钮并不止开机按钮 不应该这样初始化
   /* public Box(Command command) {
        this.command = command;
    }*/

    public void setCommand(Command openCommand) {
        this.openCommand = openCommand;
    }

    public void openCommand() {
        openCommand.execute();
    }

    private Command resetCommand = null;

    public void setResetCommand(Command resetCommand) {
        this.resetCommand = resetCommand;
    }

    public void resetCommand() {
        resetCommand.execute();
    }
}
